<div class="form-group">

    <label class="col-lg control-label">编码</label>

    <div class="col-sm-5">

        <input type="text" name="goodssn" id="goodssn" class="form-control hasoption" value="{$item['goodssn']}" {if $item['hasoption']}readonly{/if}//>
    </div>

</div>

<div class="form-group">

    <label class=" col-lg control-label">条码</label>

    <div class="col-sm-5">

        <input type="text" name="productsn" id="productsn" class="form-control hasoption" value="{$item['productsn']}" {if $item['hasoption']}readonly{/if}//>
    </div>

</div>

<div class="form-group" style="display: none;">

    <label class="col-lg control-label">重量</label>

    <div class="col-sm-10">

        <div class="input-group">

            <input type="text" name="weight" id="weight" class="form-control hasoption" value="{$item['weight']}" {if $item['hasoption']}readonly{/if}/>

            <span class="input-group-addon">克</span>

        </div>

    </div>

</div>



<div class="form-group">

    <label class="col-lg control-label">库存</label>

    <div class="col-sm-10">

        <input type="text" name="stock" id="stock" class="form-control hasoption" value="{$item['stock']}"  style="width:150px;display: inline;margin-right: 20px;" {if $item['hasoption']}readonly{/if}/>

        <label class="checkbox-inline">

            <input type="checkbox" id="showstock" value="1" name="showstock" {if $item['showstock']==1}checked{/if} />显示库存

        </label>

    </div>

</div>

{if $item['is_ladder'] == 0  }

<div class="form-group-title">

    多规格

    <div class="pull-right" style="text-align: right;padding-right: 28px;">

        是否开启多规格 <input class="js-switch small" id="more" name="more_spec" value="1" {if $item['more_spec'] == 1}checked{/if} type="checkbox" style="display: none;">

    </div>

</div>

{/if}

<div class="form-group" id="more_spec" {if $item['more_spec'] == 0}style="display: none"{/if}>

    <label class="col-lg control-label"></label>

    <div class="col-sm-10">

        <div id="options" style="padding:0;">

            <table class="table table-bordered table-condensed">

                <thead>

                    <tr class="active">

                        <th>

                            <div class="">

                                <div style="padding-bottom:10px;text-align:center;">商品名称</div>
                                
                            </div>

                        </th>

                        <th>

                            <div class="">

                                <div style="padding-bottom:10px;text-align:center;">原价</div>

                                <div class="input-group">

                                    <input type="text" class="form-control  input-sm option_marketprice_all valid" value="" aria-invalid="false">

                                    <span class="input-group-addon">

                                        <a href="javascript:;" class="fa fa-angle-double-down" title="批量设置" onclick="setCol('option_marketprice');"></a>

                                    </span>

                                </div>

                            </div>

                        </th>

                        <th class="type-4" style="display: none;">

                            <div class="">

                                <div style="padding-bottom:10px;text-align:center;">单独购买价格</div>

                                <div class="input-group">

                                    <input type="text" class="form-control  input-sm option_single_price_all valid" value="" aria-invalid="false">

                                    <span class="input-group-addon">

                                        <a href="javascript:;" class="fa fa-angle-double-down" title="批量设置" onclick="setCol('option_single_price');"></a>

                                    </span>

                                </div>

                            </div>

                        </th>

                        <th class="type-4">

                            <div class="">

                                <div style="padding-bottom:10px;text-align:center;">拼团价格</div>

                                <div class="input-group">

                                    <input type="text" class="form-control  input-sm option_price_all valid" value="" aria-invalid="false">

                                    <span class="input-group-addon">

                                        <a href="javascript:;" class="fa fa-angle-double-down" title="批量设置" onclick="setCol( 'option_price' );"></a>

                                    </span>

                                </div>

                            </div>

                        </th>

                        <th class="type-4">

                            <div class="">

                                <div style="padding-bottom:10px;text-align:center;">库存</div>

                                <div class="input-group">

                                    <input type="text" class="form-control  input-sm option_stock_all valid" value="" aria-invalid="false">

                                    <span class="input-group-addon">

                                        <a href="javascript:;" class="fa fa-angle-double-down" title="批量设置" onclick="setCol('option_stock');"></a>

                                    </span>

                                </div>

                            </div>

                        </th>

                    </tr>

                </thead>

                <tbody id="spec_s">

                {foreach name='specs' key='key' item='value'}

                    <tr>

                        <input type='hidden' name='spec[{$key}][specs]' value="{$value['specs']}">

                        <input type='hidden' name='spec[{$key}][id]' value="{$value['id']}">

                        <input type='hidden' name='spec[{$key}][goods_option_id]' value="{$value['goods_option_id']}">

                        <td>

                            <input type="text" class="form-control  valid " name='spec[{$key}][name]' value="{$value['title']}" aria-invalid="false">

                        </td>

                        <td>

                            <input type="text" class="form-control   valid option_marketprice" name='spec[{$key}][marketprice]' value="{$value['marketprice']}" aria-invalid="false">

                        </td>

                        <td style="display: none;">

                            <input type="text" class="form-control   valid option_single_price" name='spec[{$key}][single_price]' value="{$value['single_price']}" aria-invalid="false">

                        </td>

                        <td class="type-4">

                            <input type="text" class="form-control  option_price" name='spec[{$key}][price]' value="{$value['price']}">

                        </td>

                        <td class="type-4">

                            <input type="text" class="form-control  option_stock" name='spec[{$key}][stock]' value="{$value[stock]}">

                        </td>

                    </tr>

                {/foreach}

                </tbody>

            </table>

        </div>

    </div>

</div>